feat(snapshots): Add snapshots list table to Releases page#112819
feat(snapshots): Add snapshots list table to Releases page#112819NicoHinderling merged 7 commits intomasterfrom
Conversation
Add a new Snapshots tab to the Releases page, gated behind the organizations:preprod-snapshots feature flag. The table shows snapshot builds with columns for snapshot info, comparison changes, branch, approval status, and creation time. Key changes: - New PreprodBuildsSnapshotTable component with merged Changes column showing lifecycle state (Base/Pending/Processing/Failed) or diff summary (added/removed/modified/unchanged counts) - Separate Approval column for review status on successful comparisons - Backend: added comparison_error_message to SnapshotInfo API response with literal types for comparison_state and approval_status - Fixed N+1 queries in to_snapshot_info by using prefetched relations - Snapshots tab independently gated from Mobile Builds tab Co-Authored-By: Claude <noreply@anthropic.com>
|
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
Tag requires an explicit variant prop — use muted for neutral states, danger instead of error for failed. TabList children must be elements, not conditional expressions — use the hidden prop instead. Co-Authored-By: Claude <noreply@anthropic.com>
Backend Test FailuresFailures on
|
Show "No changes" text when comparison succeeds but all counts are zero, instead of rendering an empty cell. Add snapshot_info field to the builds endpoint test expectation. Co-Authored-By: Claude <noreply@anthropic.com>
…napshots tab Address Cursor Bugbot findings: - Show "No snapshots found" instead of "No mobile builds found" in empty state, with correct docs URL for snapshot display - Skip mobile onboarding panel when on snapshots tab - Use distinct analytics pageSource for snapshots tab Co-Authored-By: Claude <noreply@anthropic.com>
|
|
||
| const shouldShowMobileBuildsTab = | ||
| hasPreprodFeature && (hasBuildsData || hasAnyStrictlyMobileProject); | ||
| const shouldShowSnapshotsTab = !!hasSnapshotsFeature; |
There was a problem hiding this comment.
Snapshots tab visible but API requires different feature flag
High Severity
shouldShowSnapshotsTab is set to !!hasSnapshotsFeature (checking only preprod-snapshots), but the BuildsEndpoint that MobileBuilds calls requires preprod-frontend-routes and returns 403 without it. If an organization has preprod-snapshots enabled but not preprod-frontend-routes, the Snapshots tab will render but every API request will fail, showing a broken error state.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit b770732. Configure here.
| }, [selection.projects]); | ||
|
|
||
| const hasPreprodFeature = organization.features?.includes('preprod-frontend-routes'); | ||
| const hasSnapshotsFeature = organization.features?.includes('preprod-snapshots'); |
There was a problem hiding this comment.
Probe query counts snapshot builds as mobile builds
Low Severity
The buildsProbeQuery doesn't include a display filter, so the API returns all builds including snapshot-only builds. This causes hasBuildsData to be true and shouldShowMobileBuildsTab to appear even for organizations that only have snapshot builds and no actual mobile builds, leading to an empty Mobile Builds tab.
Reviewed by Cursor Bugbot for commit b770732. Configure here.
There was a problem hiding this comment.
i think that's fine
Co-Authored-By: Claude <noreply@anthropic.com>
| @@ -244,6 +245,7 @@ export default function ReleasesList() { | |||
| }, [selection.projects]); | |||
|
|
|||
| const hasPreprodFeature = organization.features?.includes('preprod-frontend-routes'); | |||
There was a problem hiding this comment.
We should probably remove this since we're GA. This boolean logic below (l286 onwards) is somewhat complex, so I think we need to address some cleanup here in a follow up
There was a problem hiding this comment.
yeah ive been going back and forth with hector about this for the past 2 weeks and as of friday convinced him we should remove it and not stress about self-hosted since I'm already working with the self-hosted contractor
|
|
||
| const shouldShowMobileBuildsTab = | ||
| hasPreprodFeature && (hasBuildsData || hasAnyStrictlyMobileProject); | ||
| const shouldShowSnapshotsTab = !!hasSnapshotsFeature; |
There was a problem hiding this comment.
Shouldn't the logic here be similar to shouldShowMobileBuildsTab? I.e. const shouldShowSnapshotsTab = hasSnapshotsFeature === true && hasSnapshotsData
There was a problem hiding this comment.
@mtopo27 wants to always show it - ill defer to him
There was a problem hiding this comment.
@rbro112 I'm a proponent of always showing for discoverability. If we only show when people have uploaded, their likelihood of them finding Snapshots is much smaller (and it's already small since it's nested under releases).
We could do something like isFrontendPlatform and try to have some sort of list of platforms that would (or would not use snapshots), but I don't think this adds a ton of cognitive load to the UX of Releases and is harmless while giving us a boost in discoverability
There was a problem hiding this comment.
There's no empty state currently so we most definitely want to add an empty state and likely education on how to get started as a follow up
There was a problem hiding this comment.
agreed, I can take that as a ticket 👍
| organization: Organization; | ||
| selectedProjectIds: string[]; | ||
| defaultDisplay?: PreprodBuildsDisplay; | ||
| hideDisplayToggle?: boolean; |
There was a problem hiding this comment.
What exactly does this do? The naming doesn't make it clear what display toggling even does
There was a problem hiding this comment.
decides whether to hide or show this. on the snapshots tab, we don't show it
Rename SnapshotInfo to SnapshotComparisonInfo and snapshot_info to snapshot_comparison_info across backend, frontend, and tests. Rename to_snapshot_info to to_snapshot_comparison_info with head_artifact parameter. Normalize dash characters and update docs URL slug. Rename shouldShowTabs to shouldShowPreprodTabs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bb6e917. Configure here.
The styled ReleasesPageFilterBar was still keyed on shouldShowMobileBuildsTab, so the margin was wrong when only the snapshots tab was visible. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>



Adds a new Snapshots tab to the Releases page for browsing visual snapshot builds. The tab is gated behind the
organizations:preprod-snapshotsfeature flag, independently from the existing Mobile Builds tab (preprod-frontend-routes).What this adds:
PreprodBuildsSnapshotTablecomponent with a consolidated column layout inspired by the old Emerge Tools UI:Backend additions to
SnapshotInfoAPI response:comparison_error_messagefield for rich Failed state tooltipscomparison_stateandapproval_statusfor type safety on both sidesFixed N+1 query issue in
to_snapshot_info()by addingselect_related/prefetch_relatedfor snapshot metrics, comparisons, and approvals in the builds endpoint querysetSnapshots tab visibility independently gated from Mobile Builds tab, with proper fallback if a user navigates to a tab whose feature flag is off